package com.yuxi.pubInter;


import org.apache.ibatis.annotations.Param;
import com.yuxi.pubInter.exception.SkException;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author sunke
 * @Date 2020-12-11 10:20:59
 * @description
 */

public interface IBaseFindMapper<T extends BaseIdDoMain<KeyType>, TS extends BaseSearch, KeyType> {
    T getDetail(KeyType id);

    List<T> getList(@Param("search") TS search);

    int getListCount(@Param("search") TS search);

    /**
     * 返回全部数据
     *
     * @param search
     * @return
     */
    List<T> getAllList(@Param("search") TS search);




    /**
     * 查询统计
     * @param fieldSet
     * @param search
     * @return
     * @throws SkException
     */
    Map<String,Object> totalMap(@Param("fieldSet") Set<String> fieldSet,@Param("search") TS search) throws SkException;


}
